import requests

from config import URL


# 运营登录
class YYlogin(object):
    url = URL + 'login'
    header = {'Content-Type': 'application/json'}

    @classmethod
    def yy_login(cls, json_data):
        resp = requests.post(url=cls.url, headers=cls.header, json=json_data)
        return resp


if __name__ == '__main__':
    data = {'username': 'admin', 'password': 'admin123', 'tenantId': 999999, 'code': '8888'}
    res = YYlogin.yy_login(data)
    print(res.json())
